<?php 
session_start();

require_once("ManageAccess.php");

$privilege = new ManageAccess();
$user = $privilege->getUserDetails($user_active);
if($user->role_id==8)
   $header_path = "includes/tow_header.php";   
else if($user->role_id==1)

    $header_path = "includes/header.php";
else
	$header_path = "includes/admin_header.php";
if($user->role_id==8)
  $adminType = "Tower Administrator";    
else
    $adminType ="";
$_SESSION["user"] = $user;



?>
 <script> 
	 var global_user = new Object();  
	global_user.admin_id = "<?php echo $user->user_id ?>"; 
	global_user.admin_type = "<?php echo $adminType ?>";
	  global_user.role_id =  "<?php echo $user->role_id ?>";
	global_user.admin_company = "<?php echo $user->company_id ?>";
	global_user.admin_companyname = "<?php if($user->company_name)echo $user->company_name; else echo 'Autogator'; ?>";
	global_user.admin_name = "<?php echo $user->first_name ?>";
     
   
</script>
